package com.example.travel.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tab_user")
public class User {

    @TableId(type = IdType.AUTO)
    private Integer uid;

    @TableField("username")
    private String userName;

    @TableField("password")
    private String passWord;

    private String name;

    private Date birthday;

    private String sex;

    private String telephone;

    private String email;

    private String status;

    private String code;

    //驼峰命名会被数据库解析为is_admin字段
    @TableField("isadmin")
    private byte isAdmin;

    //查询条件
//    @TableField(exist = false)
//    private String findName;
//
//    @TableField(exist = false)
//    private String findEmail;


}
